from invenio.bibconvert_python_engine import main
from invenio.search_engine import print_record

def format_element(bfo, template):
	"""
	Converts the records with BibConvert mechanism using Python conversion template
	
	@param template - name (or pathname) of python conversion template (template should accept record in MARCXML format)
	"""
	return main(print_record(bfo.recID, format="xm"), template)

